package jsyf.oa.entity.contract;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

/**
 * Created by Administrator on 2018/8/21 0021.
 */
@Entity
@Table(name = "t_con_collection", schema = "oa", catalog = "")
public class CollectionEntity extends BaseEntity {

    private String mainId;
    private String collection;
    private String collectionDate;
    private String createUserId;
    private Integer sortNo;
    private String createUserName;

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getCollection() {
        return collection;
    }

    public String getCollectionDate() {
        return collectionDate;
    }

    public void setCollectionDate(String collectionDate) {
        this.collectionDate = collectionDate;
    }

    public void setCollection(String collection) {
        this.collection = collection;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("COLLECTION", getCollection());
        obj.put("COLLECTION_DATE", getCollectionDate());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("SORT_NO", getSortNo());
        obj.put("CREATE_USER_NAME", getCreateUserName());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_con_collection";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("COLLECTION", "collection");
        obj.put("COLLECTION_DATE", "collectionDate");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("SORT_NO", "sortNo");
        obj.put("CREATE_USER_NAME", "createUserName");
        return obj;
    }

}
